package com.cloudpivot.receivales.meetingtemp.repository;


import com.cloudpivot.receivales.meetingtemp.entity.MeetingTempEntity;
import com.cloudpivot.receivales.meetingtemp.entity.MeetingTempItemEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MeetingTempListRepository extends JpaRepository<MeetingTempItemEntity, String> {


    //子表
    @Query(nativeQuery = true, value = "select budget.id, budget.expensebudgetitem,budget.parentId,budget.amount,budget.budgetsubtotal,budget.finalsettlementamount,budget.notes  from i7hb4_budget_ledger budget  where parentId=:parentId")
    List<MeetingTempItemEntity> getMeetingItems(@Param(value = "parentId") String parentId);
}
